import { Controller, Post, Get, Render } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { AppService } from './app.service';

@Controller()
export class AppController {
  constructor(
    private readonly appService: AppService,
    private readonly configService: ConfigService,
  ) { }
  @Get()
  @Post()
  getHello(): string {
    return this.appService.getHello();
  }


  // @Get(['wxbind', 'wxbind.html'])
  // @Render('wxbind')
  // root() {
  //   const appId = this.configService.get('wechat.appid')
  //   // 传递数据到模板
  //   return { appId };
  // }
}
